<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>客户信息记录系统</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/gray/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
    <script type="text/javascript" src="easyui/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/plugin/portal/jquery.portal.js"></script>
    <script type="text/javascript" src="easyui/plugin/easyui.resize.js"></script>
    <link rel="stylesheet" type="text/css" href="easyui/plugin/portal/portal.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <script type="text/javascript" src="easyui/easyui-lang-zh_CN.js"></script>
    <link rel="stylesheet" type="text/css" href="easyui/plugin/texteditor/texteditor.css">
    <script type="text/javascript" src="easyui/plugin/texteditor/jquery.texteditor.js"></script>
</head>
<body id="layout_body" class="easyui-layout">
<div data-options="region:'north',split:false" style="height:50px;background: #DDDDDD;overflow: hidden;">
    <a href="http://www.ranko.cn" style="margin:5px;display: inline-block;"><img src="css/logo.png" height="40px;"></a>

    <div class="fr" style="margin-right: 10px;">
        <div class="easyui-panel" >
            <a href="#" class="easyui-menubutton" data-options="menu:'#mm_user'">
                <?php
                echo Yii::app()->user->name;
                ?>
            </a>
        </div>
        <div id="mm_user" style="width:100px;">
            <!-- <div>修改密码</div>-->
            <div class="menu-sep"></div>
            <div><a href="y.php?r=site/loginout">退出</a></div>
        </div>
    </div>

</div>
<div data-options="region:'west',title:'菜单栏',split:true" style="width:180px;">
    <ul class="easyui-tree" data-options="lines:true">
        <li data-options="state:'closed'" ><span>工作台</span>
            <ul>
                <li><a href="javascript:showTab('首页','y.php?r=site/index')">工作台</a></li>
                <li><a href="javascript:showTab('公告','y.php?r=announcements/index')">公告</a></li>
            </ul>
        </li>
        <li data-options="state:'closed'" ><span>营销</span>
            <ul>
                <li><a href="javascript:showTab('营销活动','y.php?r=campaigns/index')">营销活动</a></li>
            </ul>
        </li>
        <li data-options="state:'closed'" ><span>客户</span>
            <ul>
                <li><a href="javascript:showTab('客户','y.php?r=customer/index')">客户</a></li>
                <li><a href="javascript:showTab('联系人','y.php?r=contacter/index')">联系人</a></li>
                <li><a href="javascript:showTab('联系记录','y.php?r=contactlog/index')">联系记录</a></li>
                <li><a href="javascript:showTab('纪念日','y.php?r=memdays/index')">纪念日</a></li>
            </ul>
        </li>
        <li data-options="state:'closed'" ><span>产品</span>
            <ul>
                <li><a href="javascript:showTab('产品','y.php?r=product/index')">产品</a></li>
                <li><a href="javascript:showTab('产品分类','y.php?r=productcategory/index')">产品分类</a></li>
            </ul>
        </li>
        <!--<li data-options="state:'closed'" ><span>销售</span>
            <ul>
                <li><a href="javascript:showTab('销售机会','y.php?r=potentials/index')">销售机会</a></li>
                <li><a href="javascript:showTab('报价单','y.php?r=quotes/index')">报价单</a></li>
                <li><a href="javascript:showTab('竞争对手','y.php?r=competitor/index')">竞争对手</a></li>
                <li><a href="javascript:showTab('合同订单','y.php?r=salesorder/index')">合同订单</a></li>
                <li><a href="javascript:showTab('发货单','y.php?r=invoice/index')">发货单</a></li>
                <li><a href="javascript:showTab('销售退货单','y.php?r=tuihuo/index')">销售退货单</a></li>
            </ul>
        </li>
        <li data-options="state:'closed'" ><span>采购</span>
            <ul>
                <li><a href="javascript:showTab('进货单','y.php?r=purchasedrder/index')">进货单</a></li>
                <li><a href="javascript:showTab('采购申请','y.php?r=caigous/index')">采购申请</a></li>
                <li><a href="javascript:showTab('供应商','y.php?r=vendors/index')">供应商</a></li>
                <li><a href="javascript:showTab('供应商联系人','y.php?r=vcontacts/index')">供应商联系人</a></li>
                <li><a href="javascript:showTab('供应商联系记录','y.php?r=vnotes/index')">供应商联系记录</a></li>
                <li><a href="javascript:showTab('采购退货单','y.php?r=caigoutuihuos/index')">采购退货单</a></li>
            </ul>
        </li>-->
        <li data-options="state:'closed'" ><span>售后</span>
            <ul>
                <li><a href="javascript:showTab('客户服务','y.php?r=accountrecordss/index')">客户服务</a></li>
                <li><a href="javascript:showTab('客户投诉','y.php?r=complaints/index')">客户投诉</a></li>
                <li><a href="javascript:showTab('常见问题','y.php?r=faq/index')">常见问题</a></li>
                <li><a href="javascript:showTab('常见问题分类','y.php?r=faqcategory/index')">常见问题分类</a></li>
            </ul>
        </li>
        <!--<li data-options="state:'closed'" ><span>库存</span>
            <ul>
                <li><a href="javascript:showTab('入库单','y.php?r=warehouses/index')">入库单</a></li>
                <li><a href="javascript:showTab('出库单','y.php?r=deliverys/index')">出库单</a></li>
                <li><a href="javascript:showTab('盘点','y.php?r=checks/index')">盘点</a></li>
                <li><a href="javascript:showTab('库存余额','y.php?r=balances/index')">库存余额</a></li>
                <li><a href="javascript:showTab('初始化库存','y.php?r=prdtnums/index')">初始化库存</a></li>
                <li><a href="javascript:showTab('库间调拨','y.php?r=warehousetransfers/index')">库间调拨</a></li>
                <li><a href="javascript:showTab('库存流水账','y.php?r=wareledgers/index')">库存流水账</a></li>
            </ul>
        </li>
        <li data-options="state:'closed'" ><span>财务</span>
            <ul>
                <li><a href="javascript:showTab('应收款','y.php?r=gathers/index')">应收款</a></li>
                <li><a href="javascript:showTab('应付款','y.php?r=charges/index')">应付款</a></li>
                <li><a href="javascript:showTab('付款单','y.php?r=chargesrecords/index')">付款单</a></li>
                <li><a href="javascript:showTab('往来账','y.php?r=forthamounts/index')">往来账</a></li>
                <li><a href="javascript:showTab('进项发票','y.php?r=pobills/index')">进项发票</a></li>
                <li><a href="javascript:showTab('期初余额','y.php?r=openingbalancess/index')">期初余额</a></li>
                <li><a href="javascript:showTab('费用报销','y.php?r=expenses/index')">费用报销</a></li>
                <li><a href="javascript:showTab('发票管理','y.php?r=billings/index')">发票管理</a></li>
            </ul>
        </li>-->
        <li data-options="state:'closed'" ><span>系统设置</span>
            <ul>
                <li>
                    <span>基本设置</span>
                    <ul>
                        <li><a href="javascript:showTab('系统用户','y.php?r=setting/user/index')">系统用户</a></li>
                        <li><a href="javascript:showTab('角色权限','y.php?r=setting/role/index')">角色权限</a></li>
<!--                        <li><a href="javascript:showTab('系统配置','y.php?r=setting/system/index')">系统配置</a></li>-->
<!--                        <li><a href="javascript:showTab('登入历史','y.php?r=setting/loginhistory/index')">登入历史</a></li>-->
                    </ul>
                </li>
<!--                <li>-->
<!--                    <span>系统定制</span>-->
<!--                    <ul>-->
<!--                        <li><a href="javascript:showTab('下拉框选项','y.php?r=setting/picklist/index')">下拉框选项</a></li>-->
<!--                        <li><a href="javascript:showTab('审批流程','y.php?r=setting/workflow/index')">审批流程</a></li>-->
<!--                    </ul>-->
<!--                </li>-->
<!--                <li>-->
<!--                    <span>其他设置</span>-->
<!--                    <ul>-->
<!--                        <li><a href="javascript:showTab('多仓库管理','y.php?r=setting/warehouse/index')">多仓库管理</a></li>-->
<!--                    </ul>-->
<!--                </li>-->
            </ul>
        </li>
    </ul>
</div>
<div data-options="region:'center',border:false">
    <div id="win_main" class="easyui-window" title=""
         data-options="modal:true,closed:true" style="padding: 10px;">
    </div>
    <div id="win_main_2" class="easyui-window" title=""
         data-options="modal:true,closed:true">
    </div>
    <div class="easyui-tabs"  data-options="fit:'true'"  id="sys_tab"  >

    </div>
</div>
<script>
    $(function(){
        $('#sys_tab').tabs('add',{
            'title':'首页',
            'href':'y.php?r=site/index'
        });
        $('#layout_body').layout('hidden','east');
//        $('#layout_body').layout('unsplit','east');
    });
    function showTab(title,url) {
        var tab = $('#sys_tab').tabs('getTab',title);
        if(tab!=null){
            $('#sys_tab').tabs('select',title);
        }else{
            $('#sys_tab').tabs('add',{
                'title':title,
                'href':url,
                'closable':true
            });
            $('#layout_body').layout('hidden','east');
        }
    }
    function layoutresize() {
        $("body").onresize(function () {
            $('#layout_body').layout("resize");
        });
    }
    function loadWin(title,url) {
        $('#win_main').window({
            width:$(window).width()*0.618,
            height:$(window).height()*0.618,
            modal:true,
            title:title,
            href:url,
            collapsible:false,
            minimizable:false,
            maximizable:false
        });
        $('#win_main').window('center');
        $('#win_main').window('open');
    }
    function loadWin2(title,url) {
        $('#win_main_2').window({
            width:$(window).width()*0.618*0.618,
            height:$(window).height()*0.618*0.618,
            modal:true,
            title:title,
            href:url,
            collapsible:false,
            minimizable:false,
            maximizable:false
        });
        $('#win_main_2').window('center');
        $('#win_main_2').window('open');
    }
</script>
</body>
</html>
